﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="local.aspx.cs" Inherits="EZCRS.HCMS.Web.manage.hotel.local" %>

<%@ Register Src="../usercontrol/titlepage.ascx" TagName="titlepage" TagPrefix="uc2" %>

<%@ Register assembly="Book38.Net.CustomControl" namespace="Book38.Net.CustomControl" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
      <title></title>
      <link type="text/css" href="../../style/main.css" rel="Stylesheet" /> 
      <link type="text/css" href="../../style/popbox.css" rel="Stylesheet" />
      <script language="javascript" src="../../common/main.js"></script>
      <script language="javascript" src="../../common/prototype.js"></script>
      <script language="javascript" src="../../common/autocomplete.js"></script>
     </head>
<body>
<div id="LayerBox" class="FLayer" style="display:none"></div>
    <form id="form1" runat="server">
    <uc2:titlepage id="Titlepage1" runat="server" inittitle="<%$ Resources:Site, TitleLocal %>"></uc2:titlepage>
        <table cellpadding="0" cellspacing="0" class="main-table" >
            <tr class="line-even">
                <td ><table width="100%" border="0"  cellpadding="0" cellspacing="0">
                  <tr>
                    
                    <td width="50%" valign="top">                    
                   
                    <table  align="center" border="0" cellspacing="0" cellpadding="0"  class="maininfo">
                      <tr>
                        <td  class="minfo-title"><asp:Label ID="Label1" runat="server" Text="<%$ Resources:Site, LabHotelLocal %>"></asp:Label></td>
                      </tr>
                      <tr>
                        
                        <td>
                            <cc1:WebTextBox ID="txtLocation" runat="server" CssClass="text-line" 
                                Height="150px" TextMode="MultiLine" Width="350px"><Value>
</Value></cc1:WebTextBox>                        </td>
                      </tr>
                      </table>
                   <table  align="center" border="0" cellspacing="0" cellpadding="0"  class="maininfo">
                      <tr>
                        <td class="minfo-title"><asp:Label ID="Label2" runat="server" Text="<%$ Resources:Site, LabHotelTravel %>"></asp:Label></td>
                      </tr>
                      <tr>
                        
                        <td>
                            <cc1:WebTextBox ID="txtTransportation" runat="server" CssClass="text-line" 
                                Height="150px" TextMode="MultiLine" Width="350px"><Value>
</Value></cc1:WebTextBox>                        </td>
                      </tr>
                      </table>
                                </td>
                    <td width="50%" valign="top">
                   
                    <table  align="center" border="0" cellspacing="0" cellpadding="0"  class="maininfo">
                      <tr>
                        <td colspan="6" class="minfo-title"><asp:Label ID="Label3" runat="server" Text="<%$ Resources:Site, LabHotelTraffic %>"></asp:Label></td>
                      </tr>
      <tr><td width="80">&nbsp;</td>
                        <td align="center"><asp:Label ID="Label4" runat="server" Text="<%$ Resources:Site, LabName %>"></asp:Label>                            </td>
                        <td colspan="2" align="center"><asp:Label ID="Label5" runat="server" Text="<%$ Resources:Site, LabLong %>"></asp:Label></td>
                        <td align="center"><asp:Label ID="Label6" runat="server" Text="<%$ Resources:Site, LabPosition %>"></asp:Label></td>
                        <td align="center"><asp:Label ID="Label7" runat="server" Text="<%$ Resources:Site, LabTransport %>"></asp:Label></td>
      </tr>
	  <tr><td width="80"><asp:Label ID="Label8" runat="server" Text="<%$ Resources:Site, LabAirport %>"></asp:Label>：<asp:HiddenField ID="hid1" runat="server" Value="0" />
                                            </td>
                        <td><input id="txtairportnamecomm1" type="text" runat="server" class="text-line"   onblur="$F('txtairportname1').value=TdataArray[0];this.value=TdataArray[1];"  />
                        <input type="hidden" id="txtairportname1" runat="server"/>
                        </td>
                        <td>                            
                            <input id="txtDis1" type="text" runat="server" class="text-line" size="8" /></td>
                        <td>
                            <asp:DropDownList ID="ddlUnit1" runat="server">                            </asp:DropDownList>                                            </td>
                        <td>
                            <asp:DropDownList ID="ddldir1" runat="server">                            </asp:DropDownList>                                            </td>
                        <td>                            
                            <input id="txttran1" type="text" runat="server" class="text-line" size="10" onclick="showtran(this);" readonly="readonly"/></td>
      </tr>
                      <tr>
                        <td><asp:Label ID="Label9" runat="server" Text="<%$ Resources:Site, LabAirport %>"></asp:Label>：<asp:HiddenField ID="hid2" runat="server" Value="0" />
                                            </td>
                        <td><input id="txtairportnamecomm2" type="text" runat="server" class="text-line"   onblur="$F('txtairportname2').value=FdataArray[0];this.value=FdataArray[1];"  /><input type="hidden" id="txtairportname2" runat="server" /></td>
                        <td>                            
                            <input id="txtDis2" type="text" runat="server" class="text-line" size="8" /></td>
                        <td>
                            <asp:DropDownList ID="ddlUnit2" runat="server">                            </asp:DropDownList>                                            </td>
                        <td>
                            <asp:DropDownList ID="ddldir2" runat="server">                            </asp:DropDownList>                                            </td>
                        <td>                            
                            <input id="txttran2" type="text" runat="server" class="text-line" size="10"  onclick="showtran(this);"  readonly="readonly"/></td>
                      </tr>
                      <tr>
                        <td colspan="6" height="1" class="minfo-title"></td>
                      </tr>
                      <tr>
                        <td><asp:Label ID="Label10" runat="server" Text="<%$ Resources:Site, LabTrain %>"></asp:Label>：<asp:HiddenField ID="hid3" runat="server" Value="0" />
                                            </td>
                        <td><input id="txttrainname1" type="text" runat="server" class="text-line" /></td>
                        <td>                            
                            <input id="txttraindis1" type="text" runat="server" class="text-line" 
                                size="8" /></td>
                        <td>
                            <asp:DropDownList ID="ddlUnit3" runat="server">                            </asp:DropDownList>                                            </td>
                        <td>
                            <asp:DropDownList ID="ddldir3" runat="server">                            </asp:DropDownList>                                            </td>
                        <td>                            
                            <input id="txttran3" type="text" runat="server" class="text-line" size="10" onclick="showtran(this);" readonly="readonly" /></td>
                      </tr>
                      <tr>
                        <td><asp:Label ID="Label11" runat="server" Text="<%$ Resources:Site, LabTrain %>"></asp:Label>：<asp:HiddenField ID="hid4" runat="server" Value="0" />
                                            </td>
                        <td><input id="txttrainname2" type="text" runat="server" class="text-line" /></td>
                        <td>                            
                            <input id="txttraindis2" type="text" runat="server" class="text-line" 
                                size="8" /></td>
                        <td>
                            <asp:DropDownList ID="ddlUnit4" runat="server">                            </asp:DropDownList>                                            </td>
                        <td>
                            <asp:DropDownList ID="ddldir4" runat="server">                            </asp:DropDownList>                                            </td>
                        <td>                            
                            <input id="txttran4" type="text" runat="server" class="text-line" size="10" onclick="showtran(this);" readonly="readonly" /></td>
                      </tr>
                    </table>
                    
                    <table  align="center" border="0" cellspacing="0" cellpadding="0"  class="maininfo">
                      <tr>
                        <td colspan="4" class="minfo-title"><asp:Label ID="Label12" runat="server" Text="<%$ Resources:Site, LabAPosition %>"></asp:Label></td>
                      </tr>
      <tr><td width="80"><asp:Label ID="Label13" runat="server" Text="<%$ Resources:Site, LabLongitude %>"></asp:Label>：</td>
                        <td colspan="3">
                            <cc1:WebTextBox ID="txtLongitude" runat="server" CssClass="text-line" 
                                Width="150px"><Value>
</Value></cc1:WebTextBox>                                            </td>
                      </tr>
                      <tr>
                        <td><asp:Label ID="Label14" runat="server" Text="<%$ Resources:Site, LabLatitude %>"></asp:Label>：</td>
                        <td colspan="3">
                            <cc1:WebTextBox ID="txtLatitude" runat="server" CssClass="text-line" 
                                Width="150px"><Value>
</Value></cc1:WebTextBox>                                            </td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center" valign="middle">
                        <asp:Button ID="btnsave" runat="server" CssClass="bttn" Text="<%$ Resources:Site, ButtonModify %>" 
                            onclick="btnsave_Click" />
                        <asp:HiddenField ID="hid5" runat="server" Value="0" />
                      </td>
                  </tr>
                </table>                    </td>
            </tr></table>
 
    </form>
<script language="javascript" type="text/javascript">
function showtran(obj)
{
 var combox=$F("LayerBox");
 var strn=obj.value;
 var str="<div class=\"tit\"><a href=\"javascript:closep();\"><img src=\"../../image/loading_close.gif\" border=\"0\"></a></div>";
 str+="<div class=\"content\">";

 for(iteminfo in TransType)
 {
      if(strn.indexOf(iteminfo)>=0)
      str+="<div class=\"itemn\"><input type=\"checkbox\" name=\"cbox\" value=\""+iteminfo+"\" onclick=\"selectp(this,'"+obj.id+"');\" checked>"+eval("TransType."+iteminfo)+"</div>";
	 else
	  str+="<div class=\"item\"><input type=\"checkbox\" onclick=\"selectp(this,'"+obj.id+"');\"  name=\"cbox\" value=\""+iteminfo+"\">"+eval("TransType."+iteminfo)+"</div>";
 }
 str+="</div>";
 combox.innerHTML=str;
 
 var eT=0,eL=0,p=obj;
 var sT=document.documentElement.scrollTop,sL=document.documentElement.scrollLeft;
 var eH=p.height,eW=p.width;
 if(eH==null)
   eH=5;
 while(p&&p.tagName!="BODY"){eT+=p.offsetTop;eL+=p.offsetLeft;p=p.offsetParent;}
 combox.style.top=eT+eH+'px';
 combox.style.left=eL+'px';
 combox.style.display="";
}

function closep()
{
 $F("LayerBox").style.display="none";
}
function selectp(obj,sbox)
{
  if(obj.checked)
  {
   $F(sbox).value+=","+obj.value;
  }
  else
  {
  $F(sbox).value=$F(sbox).value.replace(","+obj.value,"");
  }
}

var TdataArray=[$F('txtairportname1').value,$F('txtairportnamecomm1').value];
var FdataArray=[$F('txtairportname2').value,$F('txtairportnamecomm2').value];


function DataFocus(s,array)
{
         if(s=="T")
         {
           TdataArray=array;
         }
         else
         {
           FdataArray=array;
         }
        
} 
function  DataSelect(s,array)
{   
        if(s=="T")
         {      
         document.getElementById('txtairportname1').value=array[0];
         document.getElementById('txtairportnamecomm1').value=array[1];
         }
         else
         {
          document.getElementById('txtairportname2').value=array[0];
          document.getElementById('txtairportnamecomm2').value=array[1];
         }
}

new AutoComplete('txtairportnamecomm1', function() {  return 'ajaxselect.aspx?t=aircity&s=T&k='+this.value;});
new AutoComplete('txtairportnamecomm2', function() {  return 'ajaxselect.aspx?t=aircity&s=F&k='+this.value;});
</script>
 <script src="../../common/loaderair.js"  type="text/javascript" language="javascript"></script>
</body>
</html>